#ifndef GLWIDGET_H
#define GLWIDGET_H

#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLContext>
#include <QVector4D>
#include <QtDebug>
#include "AreaTest/glbackgroundprogram.h"
#include "AreaTest/glscanprogram.h"

class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
    Q_OBJECT
public:
    GLWidget(QWidget *parent = nullptr);
    ~GLWidget();
    void resizeWidget();

protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int w, int h);

signals:
    void renderDone();

public slots:
    void renderNow();

private:
    QOpenGLContext *lineContext;
    GLBackgroundProgram *backProgram;
    glscanprogram *scanProgram;
};

#endif // GLWIDGET_H
